package com.youzheng.serviceImpl;

import com.youzheng.entity.User;
import com.youzheng.mapper.UserMapper;
import com.youzheng.service.IUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserServiceImpl implements IUserService {
    @Resource
    private UserMapper userMapper;
    @Override
    public User login(String username, String password) {
        return userMapper.findUserByusernameAndPassword(username,password);
    }

    @Override
    public void addnewUser(String username, String password,int age,String sex,String real_name) {
        userMapper.addnewUser(username,password,age,sex,real_name);
    }
}
